<template>
    <div>
      <ul>
        <li v-for="(item,index) in Data" :key="index">
          <img @click="scaleph(item,index)" :src="item" alt="">
        </li>
      </ul>
    </div>
</template>

<script>
  import * as list from "../../../api/list.js";
    export default {
      name: "Photo",
      data(){
        return {
          Data:[]
        }
      },
      beforeMount(){
        let parmes2 = {id:this.$route.params.id2};
        list.activePhoto(parmes2).then(res=>{
         // console.log(res.data.pic_list);
          this.Data = res.data;
        })
      },
      mounted(){
        mui.back = function() {
          window.history.go(-1);
        }
      },
      methods:{
        scaleph(it2,i){
           this.$router.push('/photo2/'+(i+1)+'/'+this.Data.length);
           this.$store.commit('chuan',it2);
        }
      }
    }
</script>

<style scoped>
  ul{
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  ul li{
    margin-top: 20px;
  }
  ul li img{
    width: 320px;
    height: 190px;
    border-radius: 10px;
  }
</style>
